package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.WkEmployeePost;
import com.ysd.lis.service.WkEmployeePostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 员工档案-职务表 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-02-22
 */
@RestController
@RequestMapping("/wk/employeePost")
public class WkEmployeePostController extends BaseController {

    @Autowired
    public WkEmployeePostService wkEmployeePostService;

    @GetMapping("/getEmployeePostList/{wkEmployeeId}")
    public Result getEmployeePostList(@PathVariable("wkEmployeeId") String wkEmployeeId) {
        return wkEmployeePostService.getEmployeePostList(wkEmployeeId);
    }

    @PostMapping("/addEmployeePost")
    public Result addEmployeePost(@RequestBody WkEmployeePost wkEmployeePost) {
        return wkEmployeePostService.addWkEmployeePost(wkEmployeePost);
    }

    @PostMapping("/updateEmployeePost")
    public Result updateEmployeePost(@RequestBody WkEmployeePost wkEmployeePost) {
        return wkEmployeePostService.updateWkEmployeePost(wkEmployeePost);
    }

    @PostMapping("/deleteEmployeePost")
    public Result deleteEmployeePost(@RequestBody WkEmployeePost wkEmployeePost) {
        return wkEmployeePostService.deletewkEmployeePost(wkEmployeePost);
    }
}
